//
// Created by l on 2021/11/7.
//
#ifndef UAV_POINT_H
#define UAV_POINT_H

class point {
public:
    int x{};
    int y{};

    int G{};
    int H{};
    int F{};
    point *parent{};

    point(int x, int y) {
        this->x = x;
        this->y = y;
        parent = nullptr;
    }

    point(int x, int y, point *parent, int F = 0, int G = 0, int H = 0){

        this->x = x;
        this->y = y;

        this->parent = parent;



        this->G = G;
        this->H = H;
        this->F = F;
    }

    point() = default;

    bool operator==(point &p) const {
        if (x == p.x && y == p.y) {
            return true;
        }
        return false;
    }

    bool operator<(point &p) const {
        if (x == p.x) {
            return y < p.y;
        } else {
            return x < p.x;
        }
    }

    int getx() const {
        return x;
    }

    int gety() const {
        return y;
    }
};


#endif //UAV_POINT_H
